package com.hex.ds.hdtp.core.app.script.transfer.dto.request;

import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.commons.io.FilenameUtils;

import java.io.File;

/**
 * @Package: com.hex.ds.hdtp.core.app.script.transfer.dto.request
 * @ClassName ScriptConvertTargetListRequestDto
 * @Description: 脚本转换转换后文件清单-RequestDto对象
 * @Author: wz.li
 * @Date 2023/8/14 16:41
 * @Version v2.0.2
 **/
@Data
@Accessors(chain = true)
public class ScriptConvertTargetListRequestDto {

    private String pkId;

    private String convertTaskPkId;

    private String convertSourceListPkId;

    private String sourceFileName;

    private String sourceFilePath;

    private String sourceFileSize;

    private String convertFileName;

    private String convertFilePath;

    private String convertFileSize;

    private String convertFileContent;

    private String sourceConnCode;

    private String targetConnCode;

    private String emptyTestStatus;

    private String startTime;

    private String endTime;

    private String errorMessage;

    private String sourceConnPkId;


    public String getSourceFileAbsolutePath() {
        return FilenameUtils.separatorsToUnix(sourceFilePath + File.separator + sourceFileName);
    }

    public String getConvertFileAbsolutePath() {
        return FilenameUtils.separatorsToUnix(convertFilePath + File.separator + convertFileName);
    }
}
